package com.ease.model.type;

import java.util.Calendar;

import com.ease.common.enums.EnumUtil;
import com.ease.common.enums.ValuableEnum;

public enum DateDay implements ValuableEnum {

	Sunday((short) Calendar.SUNDAY, "日"), //
	Monday((short) Calendar.MONDAY, "一"), //
	Tuesday((short) Calendar.TUESDAY, "二"), //
	Wednesday((short) Calendar.WEDNESDAY, "三"), //
	Thursday((short) Calendar.THURSDAY, "四"), //
	Friday((short) Calendar.FRIDAY, "五"), //
	Saturday((short) Calendar.SATURDAY, "六");//

	private short value;

	private String text;

	private DateDay(short value, String text) {
		this.value = value;
		this.text = text;
	}

	public static DateDay get(short value) {
		return EnumUtil.get(DateDay.class, value, null);
	}

	public static DateDay get(String name) {
		return EnumUtil.get(DateDay.class, name, null);
	}

	/**
	 * @return the name
	 */
	public String getText() {
		return text;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name();
	}

	/**
	 * @return the value
	 */
	public short getValue() {
		return value;
	}

}
